package com.meitianhui.convenitenbuy.module.home.model.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.chad.library.adapter.base.entity.MultiItemEntity;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * Created by Administrator on 2017/11/1.
 */

/**
 * banner广告页面
 */
public class BannerBean implements MultiItemEntity,Parcelable {

    private HashMap<String,String> doc_url;

    private List<ListBean> list;

    public HashMap<String, String> getDoc_url() {
        return doc_url;
    }

    public void setDoc_url(HashMap<String, String> doc_url) {
        this.doc_url = doc_url;
    }

    public List<ListBean> getList() {
        return list;
    }

    public void setList(List<ListBean> list) {
        this.list = list;
    }

    public int Type;
    public BannerBean() {
    }
    public BannerBean(final int type) {
        Type = type;
    }
    @Override
    public int getItemType() {
        return Type;
    }



    public static class ListBean {
        /**
         * path_id : 222dbea1f268459ca0169d5c31190b1d
         * title : 本地生活首页广告2
         * url : https://sale.jd.com/act/8fiCrqTQZH.html?cpdad=1DLSUE
         */
        private String path_id;
        private String title;
        private String url;

        public String getPath_id() {
            return path_id;
        }

        public void setPath_id(String path_id) {
            this.path_id = path_id;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeSerializable(this.doc_url);
        dest.writeList(this.list);
        dest.writeInt(this.Type);
    }

    protected BannerBean(Parcel in) {
        this.doc_url = (HashMap<String, String>) in.readSerializable();
        this.list = new ArrayList<ListBean>();
        in.readList(this.list, ListBean.class.getClassLoader());
        this.Type = in.readInt();
    }

    public static final Creator<BannerBean> CREATOR = new Creator<BannerBean>() {
        @Override
        public BannerBean createFromParcel(Parcel source) {
            return new BannerBean(source);
        }

        @Override
        public BannerBean[] newArray(int size) {
            return new BannerBean[size];
        }
    };
}
